package cn.tedu.uniapp.backend.controller;

import cn.tedu.uniapp.backend.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/uniapp")
public class GetController {

    @GetMapping("/get")
    public User getUser(Integer id){

        if (id == 1){
            User user=new User();
            user.setId(1);
            user.setUsername("tom");
            user.setPassword("123456");
            return user;
        }
        return null;

    }
}
